﻿using System;

namespace UnityEngine.PostProcessing
{
	// Token: 0x020000E1 RID: 225
	[Serializable]
	public class BloomModel : PostProcessingModel
	{
		// Token: 0x17000084 RID: 132
		// (get) Token: 0x060005F7 RID: 1527 RVA: 0x00024BC8 File Offset: 0x00022DC8
		// (set) Token: 0x060005F8 RID: 1528 RVA: 0x00024BD0 File Offset: 0x00022DD0
		public BloomModel.Settings settings
		{
			get
			{
				return this.m_Settings;
			}
			set
			{
				this.m_Settings = value;
			}
		}

		// Token: 0x060005F9 RID: 1529 RVA: 0x00024BDC File Offset: 0x00022DDC
		public override void Reset()
		{
			this.m_Settings = BloomModel.Settings.defaultSettings;
		}

		// Token: 0x0400056E RID: 1390
		[SerializeField]
		private BloomModel.Settings m_Settings = BloomModel.Settings.defaultSettings;

		// Token: 0x020000E2 RID: 226
		[Serializable]
		public struct BloomSettings
		{
			// Token: 0x17000085 RID: 133
			// (get) Token: 0x060005FB RID: 1531 RVA: 0x00024BFC File Offset: 0x00022DFC
			// (set) Token: 0x060005FA RID: 1530 RVA: 0x00024BEC File Offset: 0x00022DEC
			public float thresholdLinear
			{
				get
				{
					return Mathf.GammaToLinearSpace(this.threshold);
				}
				set
				{
					this.threshold = Mathf.LinearToGammaSpace(value);
				}
			}

			// Token: 0x17000086 RID: 134
			// (get) Token: 0x060005FC RID: 1532 RVA: 0x00024C0C File Offset: 0x00022E0C
			public static BloomModel.BloomSettings defaultSettings
			{
				get
				{
					return new BloomModel.BloomSettings
					{
						intensity = 0.5f,
						threshold = 1.1f,
						softKnee = 0.5f,
						radius = 4f,
						antiFlicker = false
					};
				}
			}

			// Token: 0x0400056F RID: 1391
			[Min(0f)]
			[Tooltip("Blend factor of the result image.")]
			public float intensity;

			// Token: 0x04000570 RID: 1392
			[Min(0f)]
			[Tooltip("Filters out pixels under this level of brightness.")]
			public float threshold;

			// Token: 0x04000571 RID: 1393
			[Tooltip("Makes transition between under/over-threshold gradual (0 = hard threshold, 1 = soft threshold).")]
			[Range(0f, 1f)]
			public float softKnee;

			// Token: 0x04000572 RID: 1394
			[Tooltip("Changes extent of veiling effects in a screen resolution-independent fashion.")]
			[Range(1f, 7f)]
			public float radius;

			// Token: 0x04000573 RID: 1395
			[Tooltip("Reduces flashing noise with an additional filter.")]
			public bool antiFlicker;
		}

		// Token: 0x020000E3 RID: 227
		[Serializable]
		public struct LensDirtSettings
		{
			// Token: 0x17000087 RID: 135
			// (get) Token: 0x060005FD RID: 1533 RVA: 0x00024C5C File Offset: 0x00022E5C
			public static BloomModel.LensDirtSettings defaultSettings
			{
				get
				{
					return new BloomModel.LensDirtSettings
					{
						texture = null,
						intensity = 3f
					};
				}
			}

			// Token: 0x04000574 RID: 1396
			[Tooltip("Dirtiness texture to add smudges or dust to the lens.")]
			public Texture texture;

			// Token: 0x04000575 RID: 1397
			[Min(0f)]
			[Tooltip("Amount of lens dirtiness.")]
			public float intensity;
		}

		// Token: 0x020000E4 RID: 228
		[Serializable]
		public struct Settings
		{
			// Token: 0x17000088 RID: 136
			// (get) Token: 0x060005FE RID: 1534 RVA: 0x00024C88 File Offset: 0x00022E88
			public static BloomModel.Settings defaultSettings
			{
				get
				{
					return new BloomModel.Settings
					{
						bloom = BloomModel.BloomSettings.defaultSettings,
						lensDirt = BloomModel.LensDirtSettings.defaultSettings
					};
				}
			}

			// Token: 0x04000576 RID: 1398
			public BloomModel.BloomSettings bloom;

			// Token: 0x04000577 RID: 1399
			public BloomModel.LensDirtSettings lensDirt;
		}
	}
}
